﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using Autodesk.Revit.UI.Selection;
using FrontRoomCheck.Properties;

namespace FrontRoomCheck.Utiltiy
{
	internal class SelectionFilterRoom : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			if (elem is Room)
			{
				Room room = (Room)elem;
				string text = room.get_Parameter(BuiltInParameter.ELEM_CATEGORY_PARAM).AsValueString();
				if (text.Equals(Resources.Str_nameRoom))
				{
					return true;
				}
			}
			return false;
		}

		public bool AllowReference(Reference reference, XYZ position)
		{
			return true;
		}
	}
}
